﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace TIENITCodeGener
{
    public partial class frmCols : Form
    {

#region "Properties"
        private List<ColumnInfo> _LIST_DATA;
        public List<ColumnInfo> LIST_DATA
        {
            get { return _LIST_DATA; }
            set { _LIST_DATA = value; }
        }
#endregion

#region "Constructor"
        public frmCols()
        {
            InitializeComponent();
            ITFACommon.SetFormIcon(this);
            SetLanguage();
        }
#endregion

#region "Form Events"
        private void frmCols_Load(object sender, EventArgs e)
        {
            try
            {
                dgvListCol.DataSource = _LIST_DATA;
            }
            catch (System.Exception ex)
            {
                ITFACommon.Message_Error(ex);
            }
        }

        private void frmCols_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Escape)
            {
                this.Close();
            }
        }
#endregion

#region "Set Language"
        private void SetLanguage()
        {
            if (TIENITCodeGener.Properties.Settings.Default.Soft_Language.Equals("EN-US"))
            {
                lbl_Title.Text = "Column Detail";
                this.Text = "Column Detail";
                btnOK.Text = "OK";
            }
            else if (TIENITCodeGener.Properties.Settings.Default.Soft_Language.Equals("VI-VN"))
            {
                lbl_Title.Text = "Bảng dữ liệu";
                this.Text = "Bảng dữ liệu";
                btnOK.Text = "Đóng";
            }
        }
#endregion

    }
}
